import request from "@/request/request";
export function getUserAddrs(userId){
    return request({
        url: '/useraddr/list',
        method: 'get',
        params:{
            userId:userId
        }
    })
}
export function updateOrAddUserAddr(form){
    return request({
        url: '/useraddr/update',
        method: 'post',
        data:form
    })
}
export function deleteUserAddr(addrId){
    return request({
        url: '/useraddr/delete',
        method: 'delete',
        params:{
            addrId:addrId
        }
    })
}
export function getOrderInfo(cartIds){
    return request({
        url: '/shopcart/list-by-cartid',
        method: 'get',
        params:{
            cartIds:cartIds+''
        }
    })
}
//提交订单
export function addOrder(cartIds,orders){
    return request({
        url: '/order/add',
        method: 'post',
        data:orders,
        params:{
            cartIds:cartIds+''
        }
    })
}
//获取订单状态
export function getOrderStatus(orderId){
    return request({
        url: '/order/status/'+orderId,
        method: 'get'
    })
}